package com.dq.eduservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dq.commonutils.pojo.DqException;
import com.dq.commonutils.pojo.ResultCode;
import com.dq.eduservice.entity.EduCourseDescription;
import com.dq.eduservice.service.EduCourseDescriptionService;
import com.dq.eduservice.mapper.EduCourseDescriptionMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 课程简介(EduCourseDescription)表服务实现类
 *
 * @author Dq
 * @since 2022-07-22 19:49:26
 */
@Service
public class EduCourseDescriptionServiceImpl  extends ServiceImpl<EduCourseDescriptionMapper, EduCourseDescription>  implements EduCourseDescriptionService {

    @Autowired
    private EduCourseDescriptionMapper courseDescriptionMapper;
    @Override
    public Integer addCourseDescription(EduCourseDescription courseDescription) {
        int infectNum = courseDescriptionMapper.insert(courseDescription);
        return infectNum;
    }

    @Override
    public void deleteCourseDescriptionByCourseId(String courseId) {
        /**
         * 1。 根据课程id删除课程描述
         */
        courseDescriptionMapper.deleteById(courseId);
    }
}